<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserBankTable extends Migration
{
    /**
     * Run the migrations.
     * 银行卡资料审核
     * @return void
     */
    public function up()
    {
        Schema::create('user_bank', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->comment('用户id');
            $table->string('sfz_zimg')->default('')->comment('身份证正面');
            $table->string('sfz_fimg')->default('')->comment('身份证反面');
            $table->string('sfz_id')->default('')->comment('身份证号');
            $table->string('bank_number')->default('')->comment('银行卡号');
            $table->string('bank_type')->default('')->comment('开户银行');
            $table->string('bank_address')->nullable()->default('')->comment('开户支行');
            $table->string('swift_code')->nullable()->comment('外国银行编码');
            $table->string('status')->default(1)->comment('审核状态[0未通过1未审核2已审核]');
            $table->integer('admin_id')->default('0')->comment('审批人id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_bank');
    }
}
